<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system.  The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.).  Octal values should
| always be used to set the mode correctly.
|
*/
define('FILE_READ_MODE',  0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE',   0755);
define('DIR_WRITE_MODE',  0777);

/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/

define('FOPEN_READ',							            'rb');
define('FOPEN_READ_WRITE',						        'r+b');
define('FOPEN_WRITE_CREATE_DESTRUCTIVE',		  'wb'); // truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE',	'w+b'); // truncates existing file data, use with care
define('FOPEN_WRITE_CREATE',					        'ab');
define('FOPEN_READ_WRITE_CREATE',				      'a+b');
define('FOPEN_WRITE_CREATE_STRICT',				    'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT',		  'x+b');

/*
 * Database
 * ------------------------------------------------------------------------
 * These tables used when working with database
 */

define('DB_TABLE_PERMISSION',     'permission');
define('DB_TABLE_FILE',           'file');
define("DB_TABLE_CONFIG","config");
define("DB_TABLE_CONTENT","content");
define("DB_TABLE_CATEGORY","category");
define("DB_TABLE_CATEGORY_PROMOTION","category_promotion");
define("DB_TABLE_CITY","city");
define("DB_TABLE_STATE","state");
define("DB_TABLE_COUNTRY","country");
define("DB_TABLE_DISCUSSION","discussion");
define("DB_TABLE_EMAIL_TEMPLATE","email_template");
define("DB_TABLE_END_USER","end_user");
define("DB_TABLE_PROMOTION_FAVORITE","promotion_favorite");
define("DB_TABLE_FEEDBACK","feedback");
define("DB_TABLE_GROUP","group");
define("DB_TABLE_NOTIFICATION","notification");
define("DB_TABLE_PAYMENT_HISTORY","payment_history");
define("DB_TABLE_PROMOTION","promotion");
define("DB_TABLE_PROMOTION_DOWNLOAD","promotion_download");
define("DB_TABLE_PROMOTION_MEDIA","promotion_media");
define("DB_TABLE_PROMOTION_RATING","promotion_rating");
define("DB_TABLE_PROMOTION_RELATE","promotion_relate");
define('DB_TABLE_FAVORITE', 'promotion_favorite');
define("DB_TABLE_PROMOTION_VIEW","promotion_view");
define("DB_TABLE_PROVIDER_USER","provider_user");
define("DB_TABLE_QUEUE_EMAIL","queue_email");
define("DB_TABLE_USER","user");
define("DB_TABLE_CURRENCY","currency");
/*define_table*/

/*
 * Enviroment
 */

define('EVR_TEST', 0);
define('EVR_PRO', 1);

/**
 * Promotion status
 */

define('PROMOTION_NEW', '1');
define('PROMOTION_PEDDING', '2');
define('PROMOTION_APPROVED', '3');
define('PROMOTION_PUBLISH', '4');
define('PROMOTION_REJECT', '5');
define('PROMOTION_BLOCK', '6');

/**
 * Promotion code channel
 */
define('PROMOTION_CHANNEL_EMAIL', 1);
define('PROMOTION_CHANNEL_SMS', 2);
define('PROMOTION_CHANNEL_ALL', 3);

/**
 * Promotion code encode
 */
define('PROMOTION_ENCODE_TEXT', 1);
define('PROMOTION_ENCODE_BARCODE', 2);
define('PROMOTION_ENCODE_ALL', 3);

/**
 * Promotion download status
 */
define('PROMOTION_DOWNLOAD_NEW', 1);
define('PROMOTION_DOWNLOAD_GOT', 2);
define('PROMOTION_DOWNLOAD_CANCEL', 3);
define('PROMOTION_DOWNLOAD_REJECT', 4);

/**
 * Profile status
 */

define('PROFILE_STATUS_BLOCK', '1');
define('PROFILE_STATUS_UNACTICE', '2');
define('PROFILE_STATUS_ACTIVE', '3');

/* End of file constants.php */
/* Location: ./application/config/constants.php */